package generics_and_collections.lists;

import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Sam
 * Date: 06/02/14
 * Time: 20:55
 * To change this template use File | Settings | File Templates.
 */
public class ArrayListTest {

	public ArrayListTest(){

	}

	public void execute() {
		String[] myStrings = {"one", "two", "three", "four"};
		List myList = Arrays.asList(myStrings);

		System.out.println(myList.size());
		System.out.println(myList.get(2));

		myList.set(2, "hello");
		System.out.println(myList.toString());
		myStrings[2] = "three";
		System.out.println(myList.toString());
	}
}
